In a video encoding method which performs motion-compensated prediction, a motion vector should be searched for. In the motion vector search, the encoding efficiency is not always maximum at the position which produces the minimum power for prediction error. This is because transmitted actual encoding information includes, not only a prediction error signal, but also vector information or the like.
Accordingly, a motion vector search is performed in consideration of the amount of generated code for the motion vector as an overhead cost. In a reference software in H.264, the cost function “Cost=D+λ·R” is used when selecting the prediction mode (see, for example, Non-Patent Document 1).
In the above formula, D indicates power for prediction error, R indicates the amount of generated code for data except for orthogonal transformation coefficients, and λ is a constant determined by the quantization step size.
By employing the above method, a motion vector which requires a minimum cost can be searched for in consideration of the amount of code generated for the motion vector.
The amount of code generated for the motion vector varies depending on the video encoding method.
For example, in a general rule of MPEG-2, difference between a motion vector of a target block and a motion vector (as a predicted vector) of a block on the left side of the target block is encoded (see Non-Patent Document 2).
Additionally, in H.264, such a difference is encoded using a predicted vector which is a median of motion vectors of three blocks around the target block (see Non-Patent Document 3).
As described above, when a motion vector is commonly used in video encoding systems having different costs required for the motion vector, the motion vector which has been searched for in a first video encoding system does not always provide a minimum cost in a second video encoding system.
As an example of using, in a second stage, a motion vector (called “original motion vector”) which was used in a first stage, FIGS. 8A and 8B show a video encoding processing using another motion search method, or FIGS. 9A and 9B show a re-encoding processing.
In the former example, an encoding apparatus is formed using a motion search part or the like of another video encoding system. In the second example, an already-encoded bit stream is re-encoded so as to change the video encoding method, the bit rate, and the like.
In particular, in re-encoding, a motion vector used in the original bit stream can be used again so as to reduce the computation cost required for motion search in the re-encoding. For example, in the invention disclosed in Non-Patent Document 1, re-search is performed using the original motion vector which defines the search starting point.
In both examples, the cost is not guaranteed to be minimum in the second stage only when the original motion vector is directly used. Therefore, the encoding efficiency is degraded in comparison with a case of performing re-search for a wide area.
In particular, for the re-encoding case, in contrast that a video signal for which an original motion vector is searched for is an original signal, a decoded signal of the original bit stream is input into the second stage, that is, the target video signal is different between the first and second stages, so that the encoding efficiency probably degrades.
Therefore, in a generally employed method, only a peripheral area around the original motion vector is re-searched within a limit defined by the computation cost for the second stage. In this method, re-search is partially applied to a limited target area, thereby suppressing degradation in the encoding efficiency.
FIG. 10 is a flowchart of the above-described re-search.
As the amount of code generated for the motion vector is considered as an overhead cost, a predicted vector is computed before the re-search. However, for the research for the motion vector, only a peripheral area around the original motion vector is searched regardless of the predicted vector.
In accordance with the above method, it is possible to prevent the encoding efficiency from degrading while reducing the computation cost required for the re-search in the second stage.    Non-Patent Document 1: http://iphome.hhi.de/suehring/tml/download/ on the Internet.    Non-Patent Document 2: ISO/WC-13818-2, “Information technology—Generic coding of moving pictures and associated audio information: Video”, pp. 77-85, May, 1996.    Non-Patent Document 3: ITU-T H.264 ITU-T Rec. H.264, “Advanced video coding for generic audiovisual services”, pp. 146-149, March, 2005.    Patent Document 1: Japanese Unexamined Patent Application, First Publication No. 2000-244921.